Write a transactional file
